<script lang="jsx">
/**
 * @author lilinjie
 * @Description:
 */

import { defineComponent, onMounted } from 'vue'
import { useInjectData } from '@/context/product/product'

export default defineComponent({
  name: 'categoryModal11111112',
  setup() {
    // 弹窗部分
    const {
      cuFilterForm,
      modelData,
      isEdit,
      onClickClose,
      onClickConfirm,
      onClickCreate,
      onClickEdit
    } = useInjectData()

    return () => {
      return (
          <div class="category-modal">
            <a-modal
                v-model:open={modelData.visible}
                onCancel={onClickClose}
                onOk={onClickConfirm}
            >
              <a-form
                  class="form"
                  disabled={modelData.isView}
                  style={{ marginTop: '20px' }}
                  label-col={{ span: 4 }}
                  wrapper-col={{ span: 19 }}
              >
                {modelData.isView &&
                    <a-form-item label="编号">
                      <a-input v-model:value={cuFilterForm.id} />
                    </a-form-item>
                }
                <a-form-item label="商品名">
                  <a-input placeholder="请选择商品名" vModel:value={cuFilterForm.name} />
                </a-form-item>
                <a-form-item label="品牌">
                  <a-input placeholder="请选择品牌" vModel:value={cuFilterForm.brandId} />
                </a-form-item>
                <a-form-item label="分类">
                  <a-input placeholder="请选择分类" vModel:value={cuFilterForm.category1Id} />
                </a-form-item>
                <a-form-item label="图片">
                  <a-input placeholder="请选择图片" vModel:value={cuFilterForm.imgUrl} />

                </a-form-item>
                <a-form-item label="描述">
                  <a-input placeholder="请选择描述" vModel:value={cuFilterForm.description} />

                </a-form-item>
                <a-form-item label="库存">
                  <a-input placeholder="请选择库存" vModel:value={cuFilterForm.itemNum} />
                </a-form-item>
                <a-form-item label="状态">
                  <a-select placeholder="请选择状态" vModel:value={cuFilterForm.status}>
                    <a-select-option value={undefined}>全部</a-select-option>
                    <a-select-option value={0}>下架</a-select-option>
                    <a-select-option value={1}>上架</a-select-option>

                  </a-select>
                </a-form-item>
                <a-form-item label="审核状态">
                  <a-select placeholder="请选择审核状态" vModel:value={cuFilterForm.auditStatus}>
                    <a-select-option value={undefined}>全部</a-select-option>
                    <a-select-option value={0}>待审核</a-select-option>
                    <a-select-option value={1}>审核通过</a-select-option>
                    <a-select-option value={2}>审核不通过</a-select-option>

                  </a-select>
                </a-form-item>
              </a-form>
            </a-modal>
          </div>
      )
    }
  }
})
</script>

<style lang="less">
@import '@/assets/less/common-style.less';

.category-modal {

}
</style>
